<template>
<progress :class="['nes-progress',progressType]" :value="value" :max="max"
    :style="progressStyle"
></progress>
</template>

<script setup>
import {ref,computed } from "vue"

const props = defineProps({
  type: { type: String, default: 'default' }, // primary, success, warning, error, pattern
  value: { type: Number, default: '50' }, // 当前进度值
  max: { type: Number, default: '100' }, // 最大进度值
  width: { type: String, default: '' }, // 宽度
  height: { type: String, default: '' }, // 高度
})

const progressType = computed(()=>{
    return "is-"+props.type
})

const progressStyle = computed(()=>{
    let style = {}
    style.width = props.width
    style.height = props.height
    return style
})


</script>

<style  scoped>

</style>